<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html  xmlns="http://www.w3.org/1999/xhtml"
       xmlns:h="http://java.sun.com/jsf/html"
       xmlns:f="http://java.sun.com/jsf/core"
       xmlns:ui="http://java.sun.com/jsf/facelets"
       xmlns:p="http://primefaces.org/ui"
       xmlns:cc="http://java.sun.com/jsf/composite"
       xmlns:pe="http://primefaces.org/ui/extensions">
       
	     <!--INFERFACE-->
	     <cc:interface>  
	         <cc:attribute name="label" />  
	         <cc:attribute name="labelStyle" />  
	         <cc:attribute name="textValue" />  
	         <cc:attribute name="textStyle" /> 
	         <cc:attribute name="textSize" /> 	  
	         <cc:attribute name="textMaxLength" />        
	         <cc:attribute name="isOnlyRead" />  
	         <cc:attribute name="layout" />  
	     </cc:interface>  
	      
	     <h:outputScript library="js" name="script.js" />
	     
	     <!--IMPLEMENTATION--> 
	     <cc:implementation>  
                
              <p:inputText rendered="#{!cc.attrs.isOnlyRead}" 
                           value="#{cc.attrs.textValue}"
                           onselect="clearOnSelect(this)" 
                           size="#{empty cc.attrs.textSize ? '10' : cc.attrs.textSize}"
                           maxlength="#{empty cc.attrs.textMaxLength ? '10' : cc.attrs.textMaxLength}">
                           <pe:keyFilter mask="pint"/>
                           </p:inputText>
              
              <h:outputText rendered="#{cc.attrs.isOnlyRead}" 
                            value="#{cc.attrs.textValue}"
                            styleClass="{cc.attrs.textStyle}">
              </h:outputText>
	           
	     </cc:implementation>  
     
 </html>     
